<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()	+ path + "/";%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>">
<title><s:text name="sys.app_title" /></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<%@include file="../include/contentheader.jsp"%>
<link rel="stylesheet" rev="stylesheet" href="css/style.css" type="text/css" media="all" />
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<script type="text/javascript">
function showdepartment(){
	var vRValue = window.showModalDialog("depTree.jsp",null,"dialogWidth=320px;dialogHeight=450px;status=0;scroll=0");
	if(vRValue == undefined){
  	  	vRValue = '';
  	}
	var depid = (vRValue=='')?'':vRValue.split(',')[0];
	var depname = (vRValue=='')?'':vRValue.split(',')[1];
	if(depid != undefined && depname != undefined){
		document.getElementById("we").value = depid;
		document.getElementById("qa").value = depname;
	}
}
</script>
</head>

<body class="ContentBody">
	<form action="${pageContext.request.contextPath}/addNewDepartment.action" method="post">
	<div class="MainDiv">
	<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
		<tr>
			<th class="tablestyle_title" >部门基本信息录入</th>
		</tr>
		<tr>
		    <td class="CPanel">
				<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
				<tr>		
				   <td width="100%">
					  	<fieldset style="height:100%;">
						<legend>部门信息</legend>			      
							<table align="center" border="0" cellpadding="2" cellspacing="1" style="width:100%">
							  <tr>
							  	<td>
							  	部门名称：<input type="text" name="department.depname" />
							  	</td>
							  </tr>
							  <tr>
							  	<td>部门简称：<input type="text" name="department.depsimplename" /></td>
							  </tr>
							  <tr>
							  	<td>
							  		<s:hidden id="we" name="department.depparentid"/>
							  		上级部门：<input type="text" id="qa" readonly="true" value=""/>
							  		<img src="images/showDep.gif" onclick="showdepartment()" style="cursor: pointer;" alt="选择上级部门" title="选择上级部门" />
							  	</td>						  							  	
							  </tr>
							  <tr>
							  	<td>
							  		部门状态：<input type="radio" id="dsd" name="department.depstatus" value="D" checked="checked" /><label for="dsd">弃用</label>
							  		<input type="radio" id="dsa" name="department.depstatus" value="A" /><label for="dsa">在用</label>
							  	</td>						  							  	
							  </tr>
							</table>
					  		<br />
						</fieldset>	
					</td>
				</tr>
				</table>	
			</td>
		</tr>			
		<tr>
			<td colspan="2" align="center" height="50px">
			<input type="submit" name="Submit" value="保存" />　
			<input type="button" name="Submit2" value="返回" onclick="window.history.go(-1);"/>
			</td>
		</tr> 
	</table>
	</div>
	</form>
</body>
</html>